<?php 
session_start();

if (!$_SESSION["admin"]) header("Location: login.php"); 
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>EasyAdmin</title>
  
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="description" content="EasyAdmin" />
  <meta name="author" content="JohnGR" />
  <meta name="robots" content="nofollow" />
  
  <!-- Favicon & styles -->
  <link rel="shortcut icon" href="img/favicon.ico" />
  <link type="text/css" rel="stylesheet" href="css/style.css" />
  
  <!-- Skins (uncomment the style you want to change the skin) -->
    <!-- <link type="text/css" rel="stylesheet" href="css/skins/green.css" /> -->
    <!-- <link type="text/css" rel="stylesheet" href="css/skins/darkred.css" /> -->
    <!-- <link type="text/css" rel="stylesheet" href="css/skins/purple.css" /> -->
  <!-- END OF Skins -->
  
  <!-- Markitup styles -->
  <link type="text/css" rel="stylesheet" href="js/markitup/skins/markitup/style.css" />
  <link type="text/css" rel="stylesheet" href="js/markitup/sets/default/style.css" />
  
	<!--[if IE 6]>
		<link type="text/css" rel="stylesheet" href="css/ie6.css" />
	<![endif]-->
  <!--[if IE]>
  <style type="text/css">
    .clearfix {
      zoom: 1;     /* triggers hasLayout */
      display: block;     /* resets display for IE/Win */
      }  /* Only IE can see inside the conditional comment
      and read this CSS rule. Don't ever use a normal HTML
      comment inside the CC or it will close prematurely. */
  </style>
  <![endif]-->
  <!-- END OF Favicon & styles -->
</head>

<body>
	
  <!-- Push a little! -->
  <div class="push"></div>
 
  <!-- Container, holds the page -->
  <div id="container">
  
  	<!-- Header -->
    <div id="header">
      <div id="logo"><a href="index.php" class="logo">EasyAdmin</a></div>
      <div id="admin-details">
        <img src="img/avatar.png" alt="avatar" />
        Welcome <strong>Admin</strong>! <a href="inc/admin.logout.php" class="a-red">Logout?</a><br />
        <a href="#">Edit profile</a> | <a href="#">Visit site</a>
      </div>
    </div>
    <!-- END OF Header -->
    
    <!-- A div with clearfix to hold the floated divs inside -->
  	<div class="clearfix">
    
    	<!-- Content -->
      <div id="content">
      
      	<!-- Main navigation OLD
        <div id="nav" class="clearfix">
          <ul id="nav-menu">
            <li><a href="#" class="active">Dashboard</a></li>
            <li><a href="#">Posts</a></li>
            <li><a href="#">Users</a></li>
            <li><a href="#">Comments</a></li>
            <li><a href="#">Newsletter</a></li>
            <li><a href="#">Settings</a></li>
          </ul>
        </div>
        END OF Main Navigation OLD -->

        <!-- Main navigation NEW -->
        <div id="nav">
          <ul id="jsddm" class="clearfix">
            <li><a href="#" class="active">Dashboard</a></li>
            <li><a href="#">Posts</a>
                <ul>
                    <li><a href="#">New post</a></li>
                    <li><a href="#">Manage posts</a></li>
                </ul>
            </li>
            <li><a href="#">Users</a>
                <ul>
                    <li><a href="#">Add user</a></li>
                    <li><a href="#">New users</a></li>
                    <li><a href="#">Manage users</a></li>
                </ul>
            </li>
            <li><a href="#">Comments</a>
                <ul>
                    <li><a href="#">New comments</a></li>
                    <li><a href="#">Manage comments</a></li>
                </ul>
            </li>
            <li><a href="#">Newsletter</a></li>
            <li><a href="#">Settings</a>
                <ul>
                    <li><a href="#">Website Settings</a></li>
                    <li><a href="#">Admin Settings</a></li>
                </ul>
            </li>
          </ul>
        </div>
        <!-- END OF Main Navigation NEW -->
        
        <!-- Statistics (You can put your statistics to the jquery.plot.config.js file) -->
      	<h2 class="ic-default">Statistics (Visitors)</h2>
        <div class="pad-lr">
        	<div id="placeholder" style="width:620px;height:300px;"></div>
        </div>
        <!-- END OF Statistics -->
        
        <!-- Messages -->
        <h2 class="ic-taggreen">Messages</h2>
        <div class="pad-lr">
          <div class="msg-info hidethis">Just to let you know message! :)</div>
          <div class="msg-atten hidethis">Hmm.. You should pay attention here message! :)</div>
          <div class="msg-ok hidethis">Everything went well message! :)</div>
          <div class="msg-error hidethis">Oups, something went terrible wrong, or something like that message! :)</div>
        </div>
        <!-- END OF Messages -->
        
        <!-- Tables -->  
        <h2 class="ic-db">Data in tables</h2>
        <div class="pad-lr">
        	<table>
            <tr>
            	<th>Username</th>
              <th>Email</th>
              <th>Full Name</th>
              <th class="center">Actions</th>
            </tr>
            <tr>
            	<td>john</td>
              <td>john@example.com</td>
              <td>John Taylor</td>
              <td class="center">
                <a href="#" class="tooltip-top" title="Seng a message to this user"><img src="img/action-msg.png" alt="action-msg" /></a>
                <a href="#" class="tooltip-top" title="Edit user"><img src="img/action-edit.png" alt="action-edit" /></a>
              	<a href="#" class="tooltip-top" title="This user is ok"><img src="img/action-ok.png" alt="action-ok" /></a>
              	<a href="#" class="tooltip-top" title="Delete user"><img src="img/action-del.png" alt="action-del" /></a>
              </td>
            </tr>
            <tr>
            	<td class="t-color">george</td>
              <td class="t-color">george@example.com</td>
              <td class="t-color">George Taylor</td>
              <td class="t-color center">
              	<a href="#" class="tooltip-top" title="Seng a message to this user"><img src="img/action-msg.png" alt="action-msg" /></a>
              	<a href="#" class="tooltip-top" title="Edit user"><img src="img/action-edit.png" alt="action-edit" /></a>
              	<a href="#" class="tooltip-top" title="This user is ok"><img src="img/action-ok.png" alt="action-ok" /></a>
              	<a href="#" class="tooltip-top" title="Delete user"><img src="img/action-del.png" alt="action-del" /></a>
              </td>
            </tr>
            <tr>
            	<td>mike</td>
              <td>mike@example.com</td>
              <td>Mike Taylor</td>
              <td class="center">
              	<a href="#" class="tooltip-top" title="Seng a message to this user"><img src="img/action-msg.png" alt="action-msg" /></a>
              	<a href="#" class="tooltip-top" title="Edit user"><img src="img/action-edit.png" alt="action-edit" /></a>
              	<a href="#" class="tooltip-top" title="This user is ok"><img src="img/action-ok.png" alt="action-ok" /></a>
              	<a href="#" class="tooltip-top" title="Delete user"><img src="img/action-del.png" alt="action-del" /></a>
              </td>
            </tr>
            <tr>
            	<td class="t-color">shadow</td>
              <td class="t-color">shadow@example.com</td>
              <td class="t-color">Michael Taylor</td>
              <td class="t-color center">
              	<a href="#" class="tooltip-top" title="Seng a message to this user"><img src="img/action-msg.png" alt="action-msg" /></a>
              	<a href="#" class="tooltip-top" title="Edit user"><img src="img/action-edit.png" alt="action-edit" /></a>
              	<a href="#" class="tooltip-top" title="This user is ok"><img src="img/action-ok.png" alt="action-ok" /></a>
              	<a href="#" class="tooltip-top" title="Delete user"><img src="img/action-del.png" alt="action-del" /></a>
              </td>
            </tr>
            <tr>
            	<td>steven</td>
              <td>steven@example.com</td>
              <td>Steve Taylor</td>
              <td class="center">
              	<a href="#" class="tooltip-top" title="Seng a message to this user"><img src="img/action-msg.png" alt="action-msg" /></a>
              	<a href="#" class="tooltip-top" title="Edit user"><img src="img/action-edit.png" alt="action-edit" /></a>
              	<a href="#" class="tooltip-top" title="This user is ok"><img src="img/action-ok.png" alt="action-ok" /></a>
              	<a href="#" class="tooltip-top" title="Delete user"><img src="img/action-del.png" alt="action-del" /></a>
              </td>
            </tr>
            <tr>
            	<td class="t-color">julia</td>
              <td class="t-color">julia@example.com</td>
              <td class="t-color">Julia Taylor</td>
              <td class="t-color center">
              	<a href="#" class="tooltip-top" title="Seng a message to this user"><img src="img/action-msg.png" alt="action-msg" /></a>
              	<a href="#" class="tooltip-top" title="Edit user"><img src="img/action-edit.png" alt="action-edit" /></a>
              	<a href="#" class="tooltip-top" title="This user is ok"><img src="img/action-ok.png" alt="action-ok" /></a>
              	<a href="#" class="tooltip-top" title="Delete user"><img src="img/action-del.png" alt="action-del" /></a>
              </td>
            </tr>
          </table>
          
          <form action="index.php" method="post" onsubmit="return false;">
          <table>
            <tr>
            	<th class="t-narrow"><input type="checkbox" /></th>
            	<th>Date</th>
              <th>Title</th>
              <th>Text</th>
              <th class="center">Actions</th>
            </tr>
            <tr>
            	<td class="t-narrow"><input type="checkbox" /></td>
            	<td>10/11/2009</td>
              <td><a href="#">Just a reminder</a></td>
              <td>Cras a magna turpis..</td>
              <td class="center">
                <a href="#" class="tooltip-top" title="Edit post"><img src="img/action-edit.png" alt="action-edit" /></a>
              	<a href="#" class="tooltip-top" title="This post is ok"><img src="img/action-ok.png" alt="action-ok" /></a>
              	<a href="#" class="tooltip-top" title="Delete post"><img src="img/action-del.png" alt="action-del" /></a>
              </td>
            </tr>
            <tr>
            	<td class="t-color t-narrow"><input type="checkbox" /></td>
            	<td class="t-color">05/11/2009</td>
              <td class="t-color"><a href="#">New gadget</a></td>
              <td class="t-color">Cras a magna turpis..</td>
              <td class="t-color center">
              	<a href="#" class="tooltip-top" title="Edit post"><img src="img/action-edit.png" alt="action-edit" /></a>
              	<a href="#" class="tooltip-top" title="This post is ok"><img src="img/action-ok.png" alt="action-ok" /></a>
              	<a href="#" class="tooltip-top" title="Delete post"><img src="img/action-del.png" alt="action-del" /></a>
              </td>
            </tr>
            <tr>
            	<td class="t-narrow"><input type="checkbox" /></td>
            	<td>25/09/2008</td>
              <td><a href="#">Technology is upon us</a></td>
              <td>Cras a magna turpis..</td>
              <td class="center">
              	<a href="#" class="tooltip-top" title="Edit post"><img src="img/action-edit.png" alt="action-edit" /></a>
              	<a href="#" class="tooltip-top" title="This post is ok"><img src="img/action-ok.png" alt="action-ok" /></a>
              	<a href="#" class="tooltip-top" title="Delete post"><img src="img/action-del.png" alt="action-del" /></a>
              </td>
            </tr>
            <tr>
            	<td class="t-color t-narrow"><input type="checkbox" /></td>
            	<td class="t-color">30/06/2008</td>
              <td class="t-color"><a href="#">Just a sample post</a></td>
              <td class="t-color">Cras a magna turpis..</td>
              <td class="t-color center">
              	<a href="#" class="tooltip-top" title="Edit post"><img src="img/action-edit.png" alt="action-edit" /></a>
              	<a href="#" class="tooltip-top" title="This post is ok"><img src="img/action-ok.png" alt="action-ok" /></a>
              	<a href="#" class="tooltip-top" title="Delete post"><img src="img/action-del.png" alt="action-del" /></a>
              </td>
            </tr>
            <tr>
            	<td class="t-narrow"><input type="checkbox" /></td>
            	<td>23/01/2008</td>
              <td><a href="#">Waiting for this</a></td>
              <td>Cras a magna turpis..</td>
              <td class="center">
              	<a href="#" class="tooltip-top" title="Edit post"><img src="img/action-edit.png" alt="action-edit" /></a>
              	<a href="#" class="tooltip-top" title="This post is ok"><img src="img/action-ok.png" alt="action-ok" /></a>
              	<a href="#" class="tooltip-top" title="Delete post"><img src="img/action-del.png" alt="action-del" /></a>
              </td>
            </tr>
            <tr>
            	<td class="t-color t-narrow"><input type="checkbox" /></td>
            	<td class="t-color">18/12/2007</td>
              <td class="t-color"><a href="#">Hello World</a></td>
              <td class="t-color">Cras a magna turpis..</td>
              <td class="t-color center">
              	<a href="#" class="tooltip-top" title="Edit post"><img src="img/action-edit.png" alt="action-edit" /></a>
              	<a href="#" class="tooltip-top" title="This post is ok"><img src="img/action-ok.png" alt="action-ok" /></a>
              	<a href="#" class="tooltip-top" title="Delete post"><img src="img/action-del.png" alt="action-del" /></a>
              </td>
            </tr>
          </table>
          </form>
          
          <div class="msg-general">
          	<a href="#" class="a-dark">Select all</a> | 
            <a href="#" class="a-dark">Deselect all</a> | 
            <a href="#" class="a-dark">Other Action</a><br /><br />
            <a href="#" class="tooltip-top" title="Edit checked"><img src="img/action-edit.png" alt="action-edit" /></a>
            <a href="#" class="tooltip-top" title="Checked are ok"><img src="img/action-ok.png" alt="action-ok" /></a>
            <a href="#" class="tooltip-top" title="Delete checked"><img src="img/action-del.png" alt="action-del" /></a>
          </div>
          
          <div class="pagination center">
          	<span class="page-inactive">Page 1 of 3</span>
            <a href="#" class="page a-dark">Previous</a>
            <a href="#" class="page a-dark">1</a>
            <span class="page-active">2</span>
            <a href="#" class="page a-dark">3</a> ... 
            <a href="#" class="page a-dark">8</a>
            <a href="#" class="page a-dark">9</a>
            <a href="#" class="page a-dark">Next</a>
          </div>
          
        </div>
        <!-- END OF Tables -->
        
        <!-- Forms -->
        <h2 class="ic-tagblue">Forms</h2>
        <div class="pad-lr">
          <form action="index.php" method="post" onsubmit="return false;">
            <fieldset>
              <legend>Small</legend>
              <label for="box1">Username:</label><br />
              <input id="box1" name="box1" type="text" class="box-small tooltip-right" title="You can have a tooltip too" />
              <span class="msg2-ok">You got it right!</span>
            </fieldset>
            <fieldset>
              <legend>Medium</legend>
              <label for="box2">Email:</label><br />
              <input id="box2" name="box2" type="text" class="box-medium tooltip-right" title="Just add the class 'tooltip-top', 'tooltip-right' 'tooltip-bottom' or 'tooltip-left', add in the title attribute the text you want to appear in the tooltip and you are set! :)" />
              <span class="msg2-error">Please correct your mistake!</span>
            </fieldset>
            <fieldset>
              <legend>Large</legend>
              <label for="box3">Other information:</label><br />
              <input id="box3" name="box3" type="text" class="box-large" />
            </fieldset>
            <fieldset>
              <legend>Textarea</legend>
              <label for="textarea1">Enter your message:</label><br />
              <textarea id="textarea1" name="textarea1" cols="10" rows="10" class="ta-default"></textarea>
            </fieldset>
            <fieldset>
              <legend>MarkitUp editor</legend>
              <label for="editor">New post:</label>
              <br />
              <textarea id="editor" name="textarea2" cols="80" rows="10" class="ta-editor"></textarea>
            </fieldset>
            <fieldset>
              <legend>Select</legend>
              <label for="option">Choose one:</label><br />
              <select id="option" name="option">
              	<option value="0" selected="selected">Default</option>
                <option value="1">1st Option</option>
                <option value="2">2nd Option</option>
                <option value="3">3rd Option</option>
              </select>
            </fieldset>
            <fieldset>
              <legend>Radio buttons</legend>
              <label for="radio1">Radio 1</label>
              <input id="radio1" name="choose" type="radio" value="1" />
              <label for="radio2">Radio 2</label>
              <input id="radio2" name="choose" type="radio" value="2" />
              <label for="radio3">Radio 3</label>
              <input id="radio3" name="choose" type="radio" value="3" />
            </fieldset>
            <fieldset>
              <legend>Checkboxes</legend>
              <label for="checkbox1">Checkbox 1</label>
              <input id="checkbox1" name="check1" type="checkbox" value="1" />
              <label for="checkbox2">Checkbox 2</label>
              <input id="checkbox2" name="check2" type="checkbox" value="2" />
              <label for="checkbox3">Checkbox 3</label>
              <input id="checkbox3" name="check3" type="checkbox" value="3" />
            </fieldset>
            <fieldset>
              <legend>Buttons</legend>
              <input type="submit" value="Submit" class="btn-green radius" />
              <input type="submit" value="Upload" class="btn-blue radius" />
              <input type="submit" value="Post" class="btn-grey radius" />
            </fieldset>
          </form>
        </div>
        <!-- END OF Forms -->
        
        <!-- Typography -->
        <h2 class="ic-tagorange">Typography (This is header 2)</h2>
        <div class="pad-lr">

          <h1>Header 1</h1>
          <h3>Header 3</h3>
          <h4>Header 4</h4>
          <h5>Header 5</h5>
          <h6>Header 6</h6>
          
          <h4>Unordered list</h4>
          <ul>
            <li>First</li>
            <li>Second</li>
            <li>Third</li>
          </ul>
          
          <h4>Ordered list</h4>
          <ol>
            <li>First</li>
            <li>Second</li>
            <li>Third</li>
          </ol>
          
          <h4>Definition list</h4>
          <dl>
            <dt>Coffee</dt>
              <dd>Is great</dd>
            <dt>Sugar</dt>
              <dd>Is great in coffee</dd>
          </dl>
          
          <h4>Links</h4>
          <p>
          <a href="#">This is the default link</a><br />
          <a href="#" class="a-dark">This is a dark link</a><br />
          <a href="#" class="a-red">This is a red link</a><br /><br />
          </p>
          
          <h4>Text</h4>
          <p><em>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus feugiat nisi ac turpis eleifend commodo? Nullam nibh erat, placerat vel imperdiet eu, consectetur quis nisl. Fusce at luctus purus.</em></p>
          <p><strong>Aliquam facilisis molestie varius. Aliquam rutrum interdum dictum? In non magna ligula. Aliquam semper sagittis neque vitae egestas. Suspendisse dui ipsum, mollis ut commodo quis, dictum eu massa.</strong></p>
          <p>Maecenas lobortis pellentesque sapien eget blandit! In molestie vulputate risus, et porta quam pharetra at. Quisque porttitor, purus sed egestas porta, metus massa venenatis erat, vitae tempus eros nibh at odio.</p>
          
        </div>
        <!-- END OF Typography -->
        
        <!-- Custom, Add your category -->
        <h2 class="ic-style">Your main category</h2>
        <div class="pad-lr">
        <!-- Add your content here -->
          Your main content!!
        </div>
        <!-- END OF Custom -->
        
      </div>
      <!-- END OF CONTENT -->
      
      <!-- SIDEBAR -->
      <div id="sidebar">
        
        <!-- Side navigation -->
        <div id="nav-side" class="clearfix">
          <ul id="nav-side-menu">
          	<li><a href="#" onclick="return side_show('side-config')" class="tooltip-top" title="Website configuration"><img src="img/nav-side-config.png" alt="cfg" /></a></li>
            <li><a href="#" onclick="return side_show('side-new')" class="tooltip-top" title="Add quick post"><img src="img/nav-side-new.png" alt="addn" /></a></li>
            <li><a href="#" onclick="return side_show('side-user')" class="tooltip-top" title="Add user"><img src="img/nav-side-user.png" alt="addm" /></a></li>
            <li><a href="#" onclick="return side_show('side-twitter')" class="tooltip-top" title="Update status on Twitter"><img src="img/nav-side-twitter.png" alt="ust" /></a></li>
            <!-- 
            Add as many as you like, the only thing you NEED to do here is to define the id of the div this link will correspond to.
            You will put this id as a parameter in the javascript function (... onclick="return side_show('your_div_id')" ...).
            My recommendation is to put the 'side-' prefix to each div id (widget) so that you can keep things organized.
            The second step is to add the div with this id inside the div with id pop_down. See below for more info
            -->
            <li><a href="#" onclick="return side_show('side-widget')" class="tooltip-top" title="Add your description here"><img src="img/nav-side-style.png" alt="nw" /></a></li>
          </ul>
        </div>
        <!-- END OF Side navigation -->
        
        <!-- Sidebar pop down option (In this div you will put all the sidebar widget divs -->
        <div id="pop_down">
        	<a href="#" onclick="return side_hide()" class="side-a">Close</a>
        	
          <!-- Website Configuration -->
          <div id="side-config" class="side-content">
          	<form action="index.php" method="post" onsubmit="return false;">
              <label for="ws_name">Website's title:</label><br />
              <input id="ws_name" name="ws_name" type="text" class="box-medium" value="Your website's title!" /><br />
              <label for="ws_desc">Description (meta):</label><br />
              <textarea id="ws_desc" name="ws_desc" cols="10" rows="5" class="ta-side">The site's description goes here!</textarea><br />
              <label for="ws_keywords">Keywords (meta):</label><br />
              <input id="ws_keywords" name="ws_keywords" type="text" class="box-medium" value="cool, great, unique, wonderful" /><br />
 	            <div align="right"><input type="submit" value="Update" class="btn-green radius" /></div>
            </form>
          </div>
          <!-- END OF Website Configuration -->
        	
          <!-- Add quick post -->
          <div id="side-new" class="side-content">
          	<form action="index.php" method="post" onsubmit="return false;">
              <label for="add_title">Title:</label><br />
              <input id="add_title" name="add_title" type="text" class="box-medium" /><br />
              <label for="add_tags">Tags:</label><br />
              <input id="add_tags" name="add_tags" type="text" class="box-medium" /><br />
              <label for="add_text">Text:</label><br />
              <textarea id="add_text" name="add_text" cols="10" rows="10" class="ta-side"></textarea><br />
 	          <div align="right"><input type="submit" value="Add new post" class="btn-green radius" /></div>
            </form>
          </div>
          <!-- END OF Add quick post -->
          
          <!-- Add user -->
          <div id="side-user" class="side-content">
          	<div class="msg-ok radius center">User added successfully!!</div>
            <div class="msg-error radius center">Error!!</div>
            <div class="msg-loading radius">Loading..</div>
          	<form action="index.php" method="post" onsubmit="return false;">
              <label for="add_username">Username:</label><br />
              <input id="add_username" name="add_username" type="text" class="box-medium tooltip-left" title="Username must have only numbers and letters!" /><br />
              <label for="add_email">Email:</label><br />
              <input id="add_email" name="add_email" type="text" class="box-medium" /><br />
              <label for="add_password">Password:</label><br />
              <input id="add_password" name="add_password" type="password" class="box-medium tooltip-left" title="Password must be at least 6 characters long and contains at least 3 letters!" /><br />
              <label for="role">Role:</label><br />
              <div align="left" style="display:inline;">
              <select id="role" name="role">
              	<option value="0" selected="selected">Member</option>
                <option value="1">Writer</option>
                <option value="2">Reviewer</option>
                <option value="3">Administrator</option>
              </select>
              </div>
 	            <div align="right" style="display:inline;"><input type="submit" value="Add user" class="btn-green radius" /></div>
            </form>
          </div>
          <!-- END OF Add user -->
          
          <!-- Update status on Twitter -->
          <div id="side-twitter" class="side-content center">
          	<div id="msg-twitter">
            	<div class="msg-loading radius">Loading..</div>
            </div>
          	<form action="index.php" method="post" onsubmit="return update_status();">
              <textarea id="tweet" name="tweet" cols="10" rows="5" class="ta-side"></textarea><br />
              <span class="charsLeft"></span>
              <div align="right"><input type="submit" value="Update status" class="btn-green radius" /></div>
            </form>
          </div>
          <!-- END OF Update status on Twitter -->
          
          <!-- Your sidebar widget -->
          <!-- Just enter the id which you define in the side navigation menu and DON'T forget to add the class 'side-content'. You are set :) -->
          <div id="side-widget" class="side-content center">
          	Your side widget<br />
            (You can add as many as you like :)
          </div>
          <!-- END OF Your sidebar widget -->
          
        </div>
        <!-- END OF Sidebar pop down option -->
      	
        <!-- Sidebar - New messages -->
      	<h3 class="ic-side-msg">New personal messages (<span id="pm-nums">2</span>)</h3>
        <div class="pad-lr">
        	
          <!-- A message -->
          <!--
          For the effects (read it, reply, delete) to run you need to add the id of each message container with 
          the following style: 
          		id="pm-messageid", e.g. as shown below id="pm-150"
          -->
        	<div id="pm-150" class="new-stuff radius">
          	<div class="new-minititle">
            	Sent from <strong><a href="#">Isabella</a></strong> on <strong>14/12/2009</strong>
            </div>
            <div class="new-minicontent">
            	Hey admin, I just like to tell you that your website rocks!
            </div>
            <div class="new-minimenu">
            	<!--
              Then at the following links you need to add the message id to the javascript functions:
          				onclick="return hide_pm(messageid, 1);" ... onclick="return reply_pm(messageid);" ... onclick="return hide_pm(messageid, 0);"
              The second parameter is the type of effect: 1 for hide, 0 for slideUp
              -->
            	<a href="#" class="a-dark" onclick="return hide_pm(150, 1);">I read it</a> | <a href="#" class="a-dark" onclick="return reply_pm(150);">Reply</a> | <a href="#" class="a-red" onclick="return hide_pm(150, 0);">Delete</a>
            </div>
            <!-- 
            As above the reply div id must have the following style: id="pm-reply-messageid", e.g. as shown below id="pm-reply-150"
            You are set! :)
            -->
            <div id="pm-reply-150" class="new-minireply">
            	<form action="index.php" method="post" onsubmit="return hide_pm(150, 1);">
              	<textarea id="pm_reply" name="pm_reply" cols="20" rows="5" class="ta-side-reply"></textarea><br />
             	  <div align="right"><input type="submit" value="Send" class="btn-grey radius" /></div>
            	</form>
            </div>
          </div>
          
          <!-- Another message -->
          <div id="pm-151" class="new-stuff radius">
          	<div class="new-minititle">
            	Sent from <strong><a href="#">Mike</a></strong> on <strong>15/12/2009</strong>
            </div>
            <div class="new-minicontent">
            	I can't write any comments with my account, can you help me?
            Thanks in advance..</div>
            <div class="new-minimenu">
            	<a href="#" class="a-dark" onclick="return hide_pm(151, 1);">I read it</a> | <a href="#" class="a-dark" onclick="return reply_pm(151);">Reply</a> | <a href="#" class="a-red" onclick="return hide_pm(151, 0);">Delete</a>
            </div>
            <div id="pm-reply-151" class="new-minireply">
            	<form action="index.php" method="post" onsubmit="return hide_pm(151, 1);">
              	<textarea id="pm" name="pm" cols="20" rows="5" class="ta-side-reply"></textarea><br />
             	  <div align="right"><input type="submit" value="Send" class="btn-grey radius" /></div>
            	</form>
            </div>
          </div>
          
        </div>
        <!-- END OF Sidebar - New messages -->
        
        <!-- Sidebar - New comments -->
        <h3 class="ic-side-comment">New comments (<span id="cm-nums">3</span>)</h3>
        <div class="pad-lr">
        
        	<!-- A comment -->
          <!--
          For the effects (approve, delete) to run you need to add the id of each comment container with 
          the following style: 
          		id="cm-commentid", e.g. as shown below id="cm-848"
          -->
        	<div id="cm-848" class="new-stuff radius">
          	<div class="new-minititle">
            	Posted <a href="#">here</a> from <strong><a href="#">Emma</a></strong> on <strong>15/12/2009</strong>
            </div>
            <div class="new-minicontent">
            	This is great!!</div>
            <div class="new-minimenu">
            	<!--
              Then in the following links you need to add the comment id to the javascript functions:
          				onclick="return hide_cm(commentid, 1);" ... onclick="return hide_cm(commentid, 0);"
              The second parameter is the type of effect: 1 for hide, 0 for slideUp
              You are set! :)
              -->
            	<a href="#" class="a-dark" onclick="return hide_cm(848, 1);">Approve</a> | <a href="#" class="a-red" onclick="return hide_cm(848, 0);">Delete</a>
            </div>
          </div>
          
          <!-- Another comment -->
          <div id="cm-849" class="new-stuff radius">
          	<div class="new-minititle">
            	Posted <a href="#">here</a> from <strong><a href="#">shadow</a></strong> on <strong>16/12/2009</strong>
            </div>
            <div class="new-minicontent">
            	I think this is what I want.
            </div>
            <div class="new-minimenu">
            	<a href="#" class="a-dark" onclick="return hide_cm(849, 1);">Approve</a> | <a href="#" class="a-red" onclick="return hide_cm(849, 0);">Delete</a>
            </div>
          </div>
          
          <!-- Another one -->
          <div id="cm-850" class="new-stuff radius">
          	<div class="new-minititle">
            	Posted <a href="#">here</a> from <strong><a href="#">spider</a></strong> on <strong>16/12/2009</strong>
            </div>
            <div class="new-minicontent">
            	It is just me or this new product is awesome??
            </div>
            <div class="new-minimenu">
            	<a href="#" class="a-dark" onclick="return hide_cm(850, 1);">Approve</a> | <a href="#" class="a-red" onclick="return hide_cm(850, 0);">Delete</a>
            </div>
          </div>
          
        </div>
        <!-- END OF Sidebar - New comments -->
				
        <!-- Sidebar - Quick statistics -->
      	<h3 class="ic-side-default">Quick statistics</h3>
        <div class="pad-lr">
          <p>
          Articles: <strong>253</strong><br />
          Comments: <strong>850</strong><br /><br />
          
          Members: <strong>3251</strong><br />
          Writers: <strong>10</strong><br />
          Reviewers: <strong>5</strong><br />
          Administrators: <strong>2</strong>
          </p>
        </div>
        <!-- END OF Sidebar - Quick statistics -->
        
        <!-- Sidebar - Custom, Add your sidebar category --> 
        <h3 class="ic-side-style">Your sidebar category</h3>
        <div class="pad-lr">
          <!-- Add your content here -->
          Your sidebar content!!
        </div>
        <!-- END OF Sidebar - Custom --> 
          
      </div>
      <!-- END OF SIDEBAR -->
      
    </div>
    <!-- END OF Div with clearfix -->
    
    <!-- Footer -->
    <div id="footer">2009 &copy; <strong>EasyAdmin</strong> by JohnGR (via Themeforest)</div>
    
  </div>
  <!-- END OF Container -->
  
  <!-- Push a little -->
  <div class="push"></div>
  
  
  <!-- Javascript -->
  
  	<!-- Jquery -->
    <!-- You can include the jquery form googleapis.com to save bandwidth -->
    <!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> -->
    <script src="js/jquery-1.3.2.min.js" type="text/javascript"></script> 

    <!-- Simple dropdown menu -->
    <script src="js/dropdown.js" type="text/javascript"></script>

    <!-- Flot (jquery plugin) -->
    <!--[if IE]><script language="javascript" type="text/javascript" src="js/excanvas.min.js"></script><![endif]-->
    <script src="js/jquery.flot.js" type="text/javascript"></script>
    <script src="js/jquery.flot.config.js" type="text/javascript"></script> <!-- You can configure further the plugin in this file (you can also add here the stats) -->
    
    <!-- Tooltip (jquery plugin) -->
    <script src="js/jquery.tipsy.js" type="text/javascript"></script>
    
    <!-- Markitup (jquery plugin) -->
    <script src="js/markitup/jquery.markitup.pack.js" type="text/javascript"></script>
    <script src="js/markitup/sets/default/set.js" type="text/javascript"></script>
    <script src="js/jquery.markitup.config.js" type="text/javascript"></script> <!-- You can configure further the plugin in this file -->
    
    <!-- CUSTOM CODE (Character limit, sidebar functions, Twitter ajax functionality, hide messages, tooltip) -->
    <script type="text/javascript">
        /* Character limit (jquery plugin) */
        (function($){$.fn.extend({limit:function(limit,element){var interval,f;var self=$(this);$(this).focus(function(){interval=window.setInterval(substring,100)});$(this).blur(function(){clearInterval(interval);substring()});substringFunction="function substring(){ var val = $(self).val();var length = val.length;if(length > limit){$(self).val($(self).val().substring(0,limit));}";if(typeof element!='undefined')substringFunction+="if($(element).html() != limit-length){$(element).html((limit-length<=0)?'0':limit-length);}";substringFunction+="}";eval(substringFunction);substring()}})})(jQuery);
        /* END OF Character limit (jquery plugin) */

        // Add the character limit to the twitter form
        $(document).ready(function() { $('#tweet').limit('140','.charsLeft'); });
        /* END OF Character limit */

        /* Hide messages and tooltip configuration */
        $(function() {
                // Hide divs
                // Enter the class 'hidethis' in a div and you can hide it
                // when you click it, used here for the message divs
                $("div.hidethis").click(function(){$(this).slideUp("fast");});

                // Tooltip Configuration
                // Enter one of the following classes (eg 'tooltip-top') to an element and to the
                // title attribute of it add the text you want to appear in the tooltip.
                // You can set the fade to true for a fade in/out effect
                $('.tooltip-top').tipsy({fade: false, gravity: 's'});
                $('.tooltip-right').tipsy({fade: false, gravity: 'w'});
                $('.tooltip-bottom').tipsy({fade: false, gravity: 'n'});
                $('.tooltip-left').tipsy({fade: false, gravity: 'e'});
        });
        /* END OF Hide messages and tooltip configuration */

        /* SIDEBAR FUNCTIONS */

        // Show specific div with the given id parameter and slides down its container
        function side_show(get_id)
        {
            if ($("div#" + get_id + "").css('display') == "none") {
                    $("div#pop_down").slideUp("fast", function() {
                        $("div.side-content").hide();
                        $("div#" + get_id + "").show();
                        $("div#pop_down").slideDown("slow");
                    });
            }

            return false;
        }

        // Hide all divs with the class 'side-content' and slides up its container
        function side_hide()
        {
            $("div#pop_down").slideUp("fast", function() {
                                                    $("div.side-content").hide();

                                                    // For twitter widget
                                                    // Hide messages and delete written tweet
                                                    $("#msg-twitter").hide();
                                                    $("textarea#tweet").val('');
                                                    $("span.charsLeft").html('140')
                                                });

            return false;
        }

        /* Functions for new stuff */
        function reply_pm(id) { // Drop down the div for reply
            $("#pm-reply-" + id + "").slideDown();

            return false;
        }
        function hide_pm(id, mode){ // Hide new personal message div
            var pm_num = $("#pm-nums");
            pm_num.html(pm_num.text() - 1);

            if (mode == 0)
                $("#pm-" + id + "").slideUp();
            else if (mode == 1)
                $("#pm-" + id + "").fadeOut();

            return false;
        }
        function hide_cm(id, mode) { // Hide new comment div
            var cm_num = $("#cm-nums");
            cm_num.html(cm_num.text() - 1);

            if (mode == 0)
                $("#cm-" + id + "").slideUp();
            else if (mode == 1)
                $("#cm-" + id + "").fadeOut();

            return false;
        }
        /* END OF Functions for new stuff */

        /* Ajax call for posting to twitter */
        function update_status() {
                var mt = $("#msg-twitter");
                var tweet = $("textarea#tweet").val();

                if (tweet) {
                    mt.hide();
                    mt.fadeIn(500);
                    mt.load("inc/twitter.update.php", {tweet: ""+tweet+""} );
                }

                return false;
        }
        /* END OF Ajax call */

        /* END OF SIDEBAR FUNCTIONS */
    </script>
    <!-- END OF CUSTOM CODE -->
  <!-- END OF Javascript -->
  
</body>

</html>